#pragma once

#include <unordered_map>
#include <string>

class RpcConfig {
public:
    RpcConfig() = default;
    void LoadConfigFile(const std::string &configfile);
    std::string GetConfig(const std::string &key);
    void PrintConfig();
private:
    // 去除头尾空格
    void Trim(std::string &src);

    // rpcserver_ip rpcserver_port zookeeper_ip zookeeper_port
    std::unordered_map<std::string, std::string> m_configMap;
};